<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<?php
require_once("config.php");

$buttons = Array(
"playbar" => Array(
	"prev" => Array("cmd"=>"prev","img"=>"prev.png",label=>"&laquo; Prev"),
	"pause" => Array("cmd"=>"pause","img"=>"pause.png",label=>"(Un)Pause"),
	"play" => Array("cmd"=>"play","img"=>"play.png",label=>"Play"),
	"next" => Array("cmd"=>"next","img"=>"next.png",label=>"Next &raquo;"),
	"stop" => Array("cmd"=>"stop","img"=>"stop.png",label=>"Stop"),
	),
"seekbar" => Array(
	"bback" => Array("cmd"=>"seek,-300","img"=>"back5m.png",label=>"&laquo;&laquo; 5 min"),
	"back" => Array("cmd"=>"seek,-10","img"=>"back10s.png",label=>"&laquo; 10 sec"),
        "jiggle" => Array("cmd"=>"jiggle","img"=>"disablescreensaver.png","label"=>"Disable Screensaver"),
	"fwd" => Array("cmd"=>"seek,10","img"=>"fwd10s.png",label=>"&raquo; 10 sec"),
	"ffwd" => Array("cmd"=>"seek,300","img"=>"fwd5m.png",label=>"&raquo;&raquo; 5 min"),
	),
"volumebar" => Array(
	"vol++" => Array("cmd"=>"volume,25","img"=>"upp.png",label=>"Volume jump"),
	"vol+"  => Array("cmd"=>"volume,5","img"=>"up.png",label=>"Volume up"),
	"vol-"  => Array("cmd"=>"volume,-5","img"=>"down.png",label=>"Volume down"),
	"vol--" => Array("cmd"=>"volume,-25","img"=>"ddown.png",label=>"Volume drop"),
	),
"toolbar" => Array(
	"playlist" => Array("cmd"=>"playlist","img"=>"playlist.png","label"=>"Playlist"),
	"files" => Array("cmd"=>"files","img"=>"files.png","label"=>"Add files to the playlist"),
	"console" => Array("cmd"=>"console","img"=>"console.png","label"=>"Command Console"),
	),
);

?>
<html>
  <head>
    <title>Xine Remote</title>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <!-- iPhone viewport hack from jailbreakme.com -->
    <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=yes" />
    <link rel="stylesheet" type="text/css" href="style.css" />
  </head>
  <body>
    <div id="playbar">
      <div class="playbar-inner">
	<?php foreach ($buttons["playbar"] as $b) { ?>
        <a target="commandframe" href="command.php?<?php echo $b["cmd"] ?>"
	><img
	 alt="<?php echo $b["label"] ?>"
	 src="<?php echo "$IMGDIR/${b['img']}" ?>" /></a>
	<?php } ?>
      </div>
      <div class="playbar-inner" id="seek_wrap">
	<?php foreach ($buttons["seekbar"] as $b) { ?>
        <a target="commandframe" href="command.php?<?php echo $b["cmd"] ?>"
	><img
	 alt="<?php echo $b["label"] ?>"
	 src="<?php echo $IMGDIR."/".$b['img'] ?>" /></a>
	<?php } ?>
      </div>
    </div>
    <div class="tblholder" id="playlist">
     <iframe src ="command.php" name="commandframe" style="width: 100%;">
      <p>Your browser does not support iframes.</p>
     </iframe>
    </div>
    <div id="volumebar">
     <!-- <img alt="Volume" src="images/volume.png" /> -->
	<?php foreach ($buttons["volumebar"] as $b) { ?>
        <a target="commandframe" href="command.php?<?php echo $b["cmd"] ?>"
	><img
	 alt="<?php echo $b["label"] ?>"
	 src="<?php echo "$IMGDIR/${b['img']}" ?>" /></a>
	<?php } ?>
    </div>
    <div id="toolbar">
	<?php foreach ($buttons["toolbar"] as $b) { ?>
        <a target="commandframe" href="command.php?<?php echo $b["cmd"] ?>"
	><img
	 alt="<?php echo $b["label"] ?>"
	 src="<?php echo "$IMGDIR/${b['img']}" ?>" /></a>
	<?php } ?>
    </div>
  </body>
</html>

